<?php

class Mainmenu
{
    private $MENUS;
    
    public function __construct()
    {
        
    }
    public function getMenu($user_id)
    {
        Zend_Loader::loadClass('Rights');
        $Rights = new Rights();
        $MENUS = array();
        
        $MENUS['Календарь']='/calendar';
        $MENUS['Уроки']='/lesson';
        //$MENUS['Посещаемость']='/attendance';
        if($Rights->CanDo($user_id,'user','index')) $MENUS['Пользователи']='/user';
        if($Rights->CanDo($user_id,'group','index')) $MENUS['Группы']='/group';
        if($Rights->CanDo($user_id,'invoice','index')) $MENUS['Счета']='/invoice';
        if($Rights->CanDo($user_id,'studentpayment','index')) $MENUS['Оплата']='/studentpayment';
        if($Rights->CanDo($user_id,'teacherpayment','index')) $MENUS['Выплата']='/teacherpayment';
        if($Rights->CanDo($user_id,'article','index')) $MENUS['Статьи']='/article';
        if($Rights->CanDo($user_id,'statistic','index')) $MENUS['Статистика']='/statistic';
        $MENUS['Тест']='/testsetup';
        
        return $MENUS;
    }
}